﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace ICNCentral.Common_Files
{
    public class Connection
    {
        public static String ConnectionString = "Data Source=.\\ADOLFO_DB;Initial Catalog=ICNCenter_DB;Integrated Security=True";

        public static SqlConnection OpenConecction()
        {
            SqlConnection Connection = new SqlConnection(Common_Files.Connection.ConnectionString);
            Connection.Open();
            return (Connection);
        }

        public static void CloseConecction(SqlConnection Connection, SqlCommand Command)
        {
            Command.ExecuteNonQuery();
            Connection.Close();
        }
    }
}
